package com.wrk._1_语法._03_分支;

import java.util.Scanner;

public class _009_求几位数 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入数据:");
        //等待输入
        int number = scanner.nextInt();
        String digit = null;
        //判断
        if (number > 0 && number <= 99999) {
            if (number < 10) {
                digit = "1位数";
            } else if (number >= 10 && number < 100) {
                digit = "2位数";
            } else if (number >= 100 && number < 1000) {
                digit = "3位数";
            } else if (number >= 1000 && number < 10000) {
                digit = "4位数";
            } else if (number >= 10000 && number <= 99999) {
                digit = "5位数";
            } else {
                System.out.println("输入错误");
            }
            System.out.println(digit);
            scanner.close();
        }

    }
}